using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using TMS.Domain.Entity;

namespace TMS.Infrastructrue.Persistence.Configuration
{
    public class BookConfiguration : Base.BaseEntityConfiguration<Book>
    {
        public override void Configure(EntityTypeBuilder<Book> builder)
        {

            base.Configure(builder);

            builder.ToTable("book");

            builder.Property(x=>x.BookName).HasColumnName("book_name").HasMaxLength(200000).HasColumnOrder(1);
            builder.Property(x=>x.Price).HasColumnName("price").HasMaxLength(200000).HasColumnOrder(2);
            builder.Property(x=>x.Count).HasColumnName("count").HasMaxLength(200000).HasColumnOrder(3);
            builder.Property(x=>x.Supplier).HasColumnName("supplier").HasMaxLength(200000).HasColumnOrder(4);
            builder.Property(x=>x.MajorId).HasColumnName("major_id").HasMaxLength(200000).HasColumnOrder(5);
            builder.Property(x=>x.TermId).HasColumnName("term_id").HasMaxLength(200000).HasColumnOrder(6);



        }

    }
}